package org.example;

import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;

import java.io.IOException;
import java.net.URISyntaxException;

/**
 * 文件的删除
 */
public class HdfsClientDelete {


    public static void main(String[] args) throws URISyntaxException, IOException, InterruptedException {

        String pathLocal = HdfsClientDelete.class.getClassLoader().getResource("").getPath();


        try (FileSystem fs = HadoopConnectUtil.getFileSystem()) {

                fs.delete(
                        new Path("/user/hive/warehouse"),
                        true

                );



        }
    }
}